<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>GeorgeLib: GeorgeLib::VBO Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">GeorgeLib
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>GeorgeLib</b></li><li class="navelem"><a class="el" href="class_george_lib_1_1_v_b_o.html">VBO</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_george_lib_1_1_v_b_o-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">GeorgeLib::VBO Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Manages the creating and rendering of <a href="http://en.wikipedia.org/wiki/Vertex_Buffer_Object">Vertex Buffer Objects (VBOs)</a>  
 <a href="class_george_lib_1_1_v_b_o.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_v_b_o_8h_source.html">VBO.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aefd92c428cc663c677ba138a58251e4b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aefd92c428cc663c677ba138a58251e4b"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1_v_b_o.html#aefd92c428cc663c677ba138a58251e4b">VBO</a> (void)</td></tr>
<tr class="memdesc:aefd92c428cc663c677ba138a58251e4b"><td class="mdescLeft">&#160;</td><td class="mdescRight">constructor <br/></td></tr>
<tr class="separator:aefd92c428cc663c677ba138a58251e4b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62f031fc48b5c54e4ea57387ae6be786"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a62f031fc48b5c54e4ea57387ae6be786"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1_v_b_o.html#a62f031fc48b5c54e4ea57387ae6be786">~VBO</a> (void)</td></tr>
<tr class="memdesc:a62f031fc48b5c54e4ea57387ae6be786"><td class="mdescLeft">&#160;</td><td class="mdescRight">destructor <br/></td></tr>
<tr class="separator:a62f031fc48b5c54e4ea57387ae6be786"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4deadbd1fd2013ba5c2679203bb955c9"><td class="memItemLeft" align="right" valign="top">GLuint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1_v_b_o.html#a4deadbd1fd2013ba5c2679203bb955c9">Begin</a> (GLenum mode)</td></tr>
<tr class="memdesc:a4deadbd1fd2013ba5c2679203bb955c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new <a class="el" href="struct_george_lib_1_1_vertex.html" title="A data structure for the information for each vertex. ">Vertex</a> Buffer Object, and start the process of adding vertices to it.  <a href="#a4deadbd1fd2013ba5c2679203bb955c9">More...</a><br/></td></tr>
<tr class="separator:a4deadbd1fd2013ba5c2679203bb955c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e67b3ec76359d94d66aff2c36dff8cb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1_v_b_o.html#a3e67b3ec76359d94d66aff2c36dff8cb">End</a> (GLenum usage=GL_STATIC_DRAW)</td></tr>
<tr class="memdesc:a3e67b3ec76359d94d66aff2c36dff8cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">End the process of adding vertices to the <a class="el" href="struct_george_lib_1_1_vertex.html" title="A data structure for the information for each vertex. ">Vertex</a> Buffer Object.  <a href="#a3e67b3ec76359d94d66aff2c36dff8cb">More...</a><br/></td></tr>
<tr class="separator:a3e67b3ec76359d94d66aff2c36dff8cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a726a838b38c2d5a9c9f7866ea098e5a7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1_v_b_o.html#a726a838b38c2d5a9c9f7866ea098e5a7">UpdateBegin</a> (GLuint id)</td></tr>
<tr class="memdesc:a726a838b38c2d5a9c9f7866ea098e5a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start the process of re-adding vertices to an already generated <a class="el" href="struct_george_lib_1_1_vertex.html" title="A data structure for the information for each vertex. ">Vertex</a> Buffer Object.  <a href="#a726a838b38c2d5a9c9f7866ea098e5a7">More...</a><br/></td></tr>
<tr class="separator:a726a838b38c2d5a9c9f7866ea098e5a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a36dee8c10053448e47a14c6b53d1c8f0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1_v_b_o.html#a36dee8c10053448e47a14c6b53d1c8f0">UpdateEnd</a> (GLuint id)</td></tr>
<tr class="memdesc:a36dee8c10053448e47a14c6b53d1c8f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">End the process of re-adding vertices to an already generated <a class="el" href="struct_george_lib_1_1_vertex.html" title="A data structure for the information for each vertex. ">Vertex</a> Buffer Object.  <a href="#a36dee8c10053448e47a14c6b53d1c8f0">More...</a><br/></td></tr>
<tr class="separator:a36dee8c10053448e47a14c6b53d1c8f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08bc881eb352e5230507592baf391085"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a08bc881eb352e5230507592baf391085"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1_v_b_o.html#a08bc881eb352e5230507592baf391085">Draw</a> (void)</td></tr>
<tr class="memdesc:a08bc881eb352e5230507592baf391085"><td class="mdescLeft">&#160;</td><td class="mdescRight">Render out the vertices of the VBOs stored. <br/></td></tr>
<tr class="separator:a08bc881eb352e5230507592baf391085"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a74ad44ccc39a3c91822425c7714aa632"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a74ad44ccc39a3c91822425c7714aa632"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1_v_b_o.html#a74ad44ccc39a3c91822425c7714aa632">AddVertex</a> (<a class="el" href="class_george_lib_1_1vec3.html">vec3</a> v)</td></tr>
<tr class="memdesc:a74ad44ccc39a3c91822425c7714aa632"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a vertex with a <code><a class="el" href="class_george_lib_1_1vec3.html" title="Holds 3 values and does vector maths. ">vec3</a></code> object. <br/></td></tr>
<tr class="separator:a74ad44ccc39a3c91822425c7714aa632"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45da4f5e7b988c72ad8369dd6872f606"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a45da4f5e7b988c72ad8369dd6872f606"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1_v_b_o.html#a45da4f5e7b988c72ad8369dd6872f606">AddVertex</a> (float x, float y, float z)</td></tr>
<tr class="memdesc:a45da4f5e7b988c72ad8369dd6872f606"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a vertex with 3 <code>float</code> values. <br/></td></tr>
<tr class="separator:a45da4f5e7b988c72ad8369dd6872f606"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a318f69012bc6d33c36531a5b735b55b9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a318f69012bc6d33c36531a5b735b55b9"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1_v_b_o.html#a318f69012bc6d33c36531a5b735b55b9">AddVertex</a> (float *v)</td></tr>
<tr class="memdesc:a318f69012bc6d33c36531a5b735b55b9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a vertex with a <code>float</code> array of 3 values. <br/></td></tr>
<tr class="separator:a318f69012bc6d33c36531a5b735b55b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0be9b83988265cc2f4bfcf274d79ca3d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0be9b83988265cc2f4bfcf274d79ca3d"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1_v_b_o.html#a0be9b83988265cc2f4bfcf274d79ca3d">AddNormal</a> (<a class="el" href="class_george_lib_1_1vec3.html">vec3</a> v)</td></tr>
<tr class="memdesc:a0be9b83988265cc2f4bfcf274d79ca3d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a normal vertex with a <code><a class="el" href="class_george_lib_1_1vec3.html" title="Holds 3 values and does vector maths. ">vec3</a></code> object. <br/></td></tr>
<tr class="separator:a0be9b83988265cc2f4bfcf274d79ca3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a729f845c7d78267aef6283b87bb262ce"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a729f845c7d78267aef6283b87bb262ce"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1_v_b_o.html#a729f845c7d78267aef6283b87bb262ce">AddNormal</a> (float x, float y, float z)</td></tr>
<tr class="memdesc:a729f845c7d78267aef6283b87bb262ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a normal vertex with 3 <code>float</code> values. <br/></td></tr>
<tr class="separator:a729f845c7d78267aef6283b87bb262ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59604551de9b35daf1c6e47ada8ef097"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a59604551de9b35daf1c6e47ada8ef097"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1_v_b_o.html#a59604551de9b35daf1c6e47ada8ef097">AddNormal</a> (float *v)</td></tr>
<tr class="memdesc:a59604551de9b35daf1c6e47ada8ef097"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a normal vertex with an array of 3 <code>float</code> values. <br/></td></tr>
<tr class="separator:a59604551de9b35daf1c6e47ada8ef097"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31866cc9f22c3fd47e70c2424cb7b3a7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a31866cc9f22c3fd47e70c2424cb7b3a7"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1_v_b_o.html#a31866cc9f22c3fd47e70c2424cb7b3a7">AddTexCoord</a> (<a class="el" href="class_george_lib_1_1vec2.html">vec2</a> v)</td></tr>
<tr class="memdesc:a31866cc9f22c3fd47e70c2424cb7b3a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a texture coordinate vertex with a <code><a class="el" href="class_george_lib_1_1vec2.html" title="Holds 2 values and does vector maths. ">vec2</a></code> object. <br/></td></tr>
<tr class="separator:a31866cc9f22c3fd47e70c2424cb7b3a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a363b84b31636d052cf4ac8b8e34b0bbd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a363b84b31636d052cf4ac8b8e34b0bbd"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1_v_b_o.html#a363b84b31636d052cf4ac8b8e34b0bbd">AddTexCoord</a> (float u, float v)</td></tr>
<tr class="memdesc:a363b84b31636d052cf4ac8b8e34b0bbd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a texture coordinate vertex with 2 <code>float</code> values. <br/></td></tr>
<tr class="separator:a363b84b31636d052cf4ac8b8e34b0bbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1170bac4119a7d1cff180f25e94aee3f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1170bac4119a7d1cff180f25e94aee3f"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1_v_b_o.html#a1170bac4119a7d1cff180f25e94aee3f">AddTexCoord</a> (float *v)</td></tr>
<tr class="memdesc:a1170bac4119a7d1cff180f25e94aee3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a texture coordinate vertex with a <code>float</code> array of 2 values. <br/></td></tr>
<tr class="separator:a1170bac4119a7d1cff180f25e94aee3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd7a52f2c8d4ad2933a898a366376518"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1_v_b_o.html#acd7a52f2c8d4ad2933a898a366376518">AddColor</a> (<a class="el" href="class_george_lib_1_1vec3.html">vec3</a> v, float a=1.0f)</td></tr>
<tr class="memdesc:acd7a52f2c8d4ad2933a898a366376518"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a color vertex with a <code><a class="el" href="class_george_lib_1_1vec3.html" title="Holds 3 values and does vector maths. ">vec3</a></code> object and a <code>float</code>.  <a href="#acd7a52f2c8d4ad2933a898a366376518">More...</a><br/></td></tr>
<tr class="separator:acd7a52f2c8d4ad2933a898a366376518"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:affc09b820d48b3dc3bbae7bd097d7d9e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1_v_b_o.html#affc09b820d48b3dc3bbae7bd097d7d9e">AddColor</a> (float r, float g, float b, float a=1.0f)</td></tr>
<tr class="memdesc:affc09b820d48b3dc3bbae7bd097d7d9e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a color vertex with 4 <code>float</code> values.  <a href="#affc09b820d48b3dc3bbae7bd097d7d9e">More...</a><br/></td></tr>
<tr class="separator:affc09b820d48b3dc3bbae7bd097d7d9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4bdbfba4fb25b5a3bdba13febab9c2da"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4bdbfba4fb25b5a3bdba13febab9c2da"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1_v_b_o.html#a4bdbfba4fb25b5a3bdba13febab9c2da">AddColor</a> (float *v)</td></tr>
<tr class="memdesc:a4bdbfba4fb25b5a3bdba13febab9c2da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a color vertex with a <code>float</code> array of 4 values. <br/></td></tr>
<tr class="separator:a4bdbfba4fb25b5a3bdba13febab9c2da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e003406645f67dad928efdf2d7f391f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1_v_b_o.html#a5e003406645f67dad928efdf2d7f391f">SetColor</a> (GLuint vbo_id, float r, float g, float b, float a=1.0f)</td></tr>
<tr class="memdesc:a5e003406645f67dad928efdf2d7f391f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the color for every vertex currently in this <a class="el" href="class_george_lib_1_1_v_b_o.html" title="Manages the creating and rendering of Vertex Buffer Objects (VBOs) ">VBO</a>.  <a href="#a5e003406645f67dad928efdf2d7f391f">More...</a><br/></td></tr>
<tr class="separator:a5e003406645f67dad928efdf2d7f391f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Manages the creating and rendering of <a href="http://en.wikipedia.org/wiki/Vertex_Buffer_Object">Vertex Buffer Objects (VBOs)</a> </p>
<p>Provides an easy interface to create, store and use VBOs. Enables the adding of <a class="el" href="struct_george_lib_1_1_vertex.html">Vertices </a> using methods similar to OpenGL's deprecated direct vertex API. <br/>
<br/>
How to use : </p>
<div class="fragment"><div class="line"><a class="code" href="class_george_lib_1_1_v_b_o.html#aefd92c428cc663c677ba138a58251e4b">VBO</a> vbo;                        <span class="comment">// Create a VBO</span></div>
<div class="line"></div>
<div class="line"><span class="keywordtype">void</span> Init(<span class="keywordtype">void</span>)</div>
<div class="line">{</div>
<div class="line">    vec3 vertices =             <span class="comment">// Specify vertices</span></div>
<div class="line">    {</div>
<div class="line">        vec3(0,0,0), vec3(1,0,0), vec3(1,1,0)</div>
<div class="line">    };</div>
<div class="line"></div>
<div class="line">    vbo.Begin(GL_TRIANGLES);    <span class="comment">// Begin pushing in vertices</span></div>
<div class="line">    vbo.AddTriangle(vertices);  <span class="comment">// Push in our vertices</span></div>
<div class="line">    vbo.End();                  <span class="comment">// End and upload vertice data</span></div>
<div class="line">}</div>
<div class="line"></div>
<div class="line"><span class="keywordtype">void</span> <a class="code" href="class_george_lib_1_1_v_b_o.html#a08bc881eb352e5230507592baf391085">Draw</a>(<span class="keywordtype">void</span>)</div>
<div class="line">{</div>
<div class="line">    vbo.Draw();                 <span class="comment">// Render vertices</span></div>
<div class="line">}</div>
</div><!-- fragment --> </div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="acd7a52f2c8d4ad2933a898a366376518"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GeorgeLib::VBO::AddColor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_george_lib_1_1vec3.html">vec3</a>&#160;</td>
          <td class="paramname"><em>v</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>a</em> = <code>1.0f</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add a color vertex with a <code><a class="el" href="class_george_lib_1_1vec3.html" title="Holds 3 values and does vector maths. ">vec3</a></code> object and a <code>float</code>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">v</td><td>RGB color values for the vertices in a <a class="el" href="class_george_lib_1_1vec3.html" title="Holds 3 values and does vector maths. ">vec3</a> object </td></tr>
    <tr><td class="paramname">a</td><td>alpha value for the vertices </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="affc09b820d48b3dc3bbae7bd097d7d9e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GeorgeLib::VBO::AddColor </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>r</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>g</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>a</em> = <code>1.0f</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add a color vertex with 4 <code>float</code> values. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">r,g,b,a</td><td>RGBA color values for the vertices </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a4deadbd1fd2013ba5c2679203bb955c9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GLuint GeorgeLib::VBO::Begin </td>
          <td>(</td>
          <td class="paramtype">GLenum&#160;</td>
          <td class="paramname"><em>mode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new <a class="el" href="struct_george_lib_1_1_vertex.html" title="A data structure for the information for each vertex. ">Vertex</a> Buffer Object, and start the process of adding vertices to it. </p>
<p>This function will call OpenGL to generate a new <a class="el" href="class_george_lib_1_1_v_b_o.html" title="Manages the creating and rendering of Vertex Buffer Objects (VBOs) ">VBO</a>. A new <a class="el" href="class_george_lib_1_1_v_b_o___data.html" title="Stores Vertex data, id of the generated Vertex Buffer Object , and the primitive drawing mode...">VBO_Data</a> object will be created, the id of the <a class="el" href="struct_george_lib_1_1_vertex.html" title="A data structure for the information for each vertex. ">Vertex</a> Buffer Object and the drawing mode will be passed in. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">mode</td><td>the type of primitive to be drawn, same as <code>glBegin(GLenum mode)</code> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the generated id of the <a class="el" href="struct_george_lib_1_1_vertex.html" title="A data structure for the information for each vertex. ">Vertex</a> Buffer Object. if <code><a class="el" href="class_george_lib_1_1_v_b_o.html#a4deadbd1fd2013ba5c2679203bb955c9" title="Create a new Vertex Buffer Object, and start the process of adding vertices to it. ">VBO::Begin()</a></code> has already been called, returns 0 </dd></dl>
<dl class="section note"><dt>Note</dt><dd>For info on 'GLenum mode', see <a href="https://www.opengl.org/sdk/docs/man2/xhtml/glBegin.xml">https://www.opengl.org/sdk/docs/man2/xhtml/glBegin.xml</a> </dd>
<dd>
Only call '<a class="el" href="class_george_lib_1_1_v_b_o.html#a74ad44ccc39a3c91822425c7714aa632" title="Add a vertex with a vec3 object. ">VBO::AddVertex</a>, <code><a class="el" href="class_george_lib_1_1_v_b_o.html#a0be9b83988265cc2f4bfcf274d79ca3d" title="Add a normal vertex with a vec3 object. ">VBO::AddNormal()</a></code>, <code><a class="el" href="class_george_lib_1_1_v_b_o.html#a31866cc9f22c3fd47e70c2424cb7b3a7" title="Add a texture coordinate vertex with a vec2 object. ">VBO::AddTexCoord()</a></code>, <code><a class="el" href="class_george_lib_1_1_v_b_o.html#acd7a52f2c8d4ad2933a898a366376518" title="Add a color vertex with a vec3 object and a float. ">VBO::AddColor()</a></code> and <code><a class="el" href="class_george_lib_1_1_v_b_o.html#a5e003406645f67dad928efdf2d7f391f" title="Sets the color for every vertex currently in this VBO. ">VBO::SetColor()</a></code> after calling this function </dd></dl>

</div>
</div>
<a class="anchor" id="a3e67b3ec76359d94d66aff2c36dff8cb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GeorgeLib::VBO::End </td>
          <td>(</td>
          <td class="paramtype">GLenum&#160;</td>
          <td class="paramname"><em>usage</em> = <code>GL_STATIC_DRAW</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>End the process of adding vertices to the <a class="el" href="struct_george_lib_1_1_vertex.html" title="A data structure for the information for each vertex. ">Vertex</a> Buffer Object. </p>
<p>Passes the vertex data to the video device, and tells OpenGL how the data will be accessed. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">usage</td><td>tells OpenGL how the vertice data will be used, </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>For info on 'GLenum usage', see <a href="http://www.opengl.org/sdk/docs/man/docbook4/xhtml/glBufferData.xml">http://www.opengl.org/sdk/docs/man/docbook4/xhtml/glBufferData.xml</a> </dd>
<dd>
Any calls adding vertex data will not apply after this function has been called </dd></dl>

</div>
</div>
<a class="anchor" id="a5e003406645f67dad928efdf2d7f391f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GeorgeLib::VBO::SetColor </td>
          <td>(</td>
          <td class="paramtype">GLuint&#160;</td>
          <td class="paramname"><em>vbo_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>r</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>g</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>a</em> = <code>1.0f</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the color for every vertex currently in this <a class="el" href="class_george_lib_1_1_v_b_o.html" title="Manages the creating and rendering of Vertex Buffer Objects (VBOs) ">VBO</a>. </p>
<dl class="section note"><dt>Note</dt><dd>Call this function between <code><a class="el" href="class_george_lib_1_1_v_b_o.html#a4deadbd1fd2013ba5c2679203bb955c9" title="Create a new Vertex Buffer Object, and start the process of adding vertices to it. ">VBO::Begin()</a></code> and <code><a class="el" href="class_george_lib_1_1_v_b_o.html#a3e67b3ec76359d94d66aff2c36dff8cb" title="End the process of adding vertices to the Vertex Buffer Object. ">VBO::End()</a></code> </dd>
<dd>
This functions only edits the color value of vertices specified before this call. All other vertices added will not have their color values edited by this call </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">vbo_id</td><td>the generated id of the <a class="el" href="struct_george_lib_1_1_vertex.html" title="A data structure for the information for each vertex. ">Vertex</a> Buffer Object </td></tr>
    <tr><td class="paramname">r,g,b,a</td><td>RGBA color values for the vertices </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a726a838b38c2d5a9c9f7866ea098e5a7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GeorgeLib::VBO::UpdateBegin </td>
          <td>(</td>
          <td class="paramtype">GLuint&#160;</td>
          <td class="paramname"><em>id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start the process of re-adding vertices to an already generated <a class="el" href="struct_george_lib_1_1_vertex.html" title="A data structure for the information for each vertex. ">Vertex</a> Buffer Object. </p>
<p>All local vertice data in the <a class="el" href="class_george_lib_1_1_v_b_o___data.html" title="Stores Vertex data, id of the generated Vertex Buffer Object , and the primitive drawing mode...">VBO_Data</a> referencing the specified <a class="el" href="class_george_lib_1_1_v_b_o.html" title="Manages the creating and rendering of Vertex Buffer Objects (VBOs) ">VBO</a> will be erased, and then the process of adding new vertice data to the <a class="el" href="class_george_lib_1_1_v_b_o.html" title="Manages the creating and rendering of Vertex Buffer Objects (VBOs) ">VBO</a> enabled. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">id</td><td>the generated id of the <a class="el" href="struct_george_lib_1_1_vertex.html" title="A data structure for the information for each vertex. ">Vertex</a> Buffer Object </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a36dee8c10053448e47a14c6b53d1c8f0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GeorgeLib::VBO::UpdateEnd </td>
          <td>(</td>
          <td class="paramtype">GLuint&#160;</td>
          <td class="paramname"><em>id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>End the process of re-adding vertices to an already generated <a class="el" href="struct_george_lib_1_1_vertex.html" title="A data structure for the information for each vertex. ">Vertex</a> Buffer Object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">id</td><td>the generated id of the <a class="el" href="struct_george_lib_1_1_vertex.html" title="A data structure for the information for each vertex. ">Vertex</a> Buffer Object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="class_george_lib_1_1_v_b_o.html#a3e67b3ec76359d94d66aff2c36dff8cb" title="End the process of adding vertices to the Vertex Buffer Object. ">VBO::End()</a> </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>C:/Users/morbidintel/Desktop/GeorgeLib/GeorgeLib/include/<a class="el" href="_v_b_o_8h_source.html">VBO.h</a></li>
<li>C:/Users/morbidintel/Desktop/GeorgeLib/GeorgeLib/src/VBO.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 21 2015 13:43:18 for GeorgeLib by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>
